package com.zhuoyue.system.mapper;

import java.util.List;

import com.zhuoyue.common.annotation.DataSource;
import com.zhuoyue.system.domain.TblHome;
import com.zhuoyue.system.domain.po.TblHomePo;
import com.zhuoyue.system.domain.vo.TblHomePositionVo;
import com.zhuoyue.system.domain.vo.TblHomeVo;
import org.apache.ibatis.annotations.Param;

import static com.zhuoyue.common.enums.DataSourceType.SLAVE;

/**
 * 家庭Mapper接口
 *
 * @author hewenze
 * @date 2020-08-07
 */
@DataSource(SLAVE)
public interface TblHomeMapper {


    Integer getHomeCount(TblHomePo tblHomePo);


    /**
     * 查询家庭列表
     *
     * @param tblHomePo 家庭
     * @return 家庭集合
     */
    List<TblHomeVo> selectTblHomeList(TblHomePo tblHomePo);

    List<TblHomePositionVo> selectTblHomePositionList(TblHomePo tblHomePo);


    TblHome selectTblHomeById(String id);

    /**
     * 通过手机号和组织编码查询家庭
     *
     * @param account
     * @param orgCode
     * @return
     */
    List<TblHomeVo> getHomeByAccountAndOrgCode(@Param("account") String account, @Param("orgCode") String orgCode, @Param("homeName") String homeName);

    Integer updateHomeHotelOrderNum(@Param("homeId") String homeId, @Param("hotelOrderNum") Integer hotelOrderNum);
}
